package com.mytijian.openapi.adapter.dingding.facade;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mytijian.openapi.adapter.dingding.param.DingDingModifyParam;
import com.mytijian.openapi.adapter.dingding.param.DingDingReportParam;
import com.mytijian.openapi.adapter.dingding.param.DingDingReserveConfirmParam;
import com.mytijian.openapi.adapter.dingding.param.DingDingReserveStateParam;
import com.mytijian.openapi.adapter.dingding.param.DingDingStockQueryParam;
import com.mytijian.openapi.adapter.dingding.result.DingDingBasicResult;
import com.mytijian.openapi.adapter.dingding.result.DingDingConfirmResult;
import com.mytijian.openapi.adapter.dingding.result.DingDingReportResult;
import com.mytijian.openapi.adapter.dingding.result.DingDingReserveStateResult;
import com.mytijian.openapi.adapter.dingding.result.DingDingStockQueryResult;
import com.mytijian.openapi.adapter.dingding.sevice.DingDingService;
import com.mytijian.runtime.model.service.AliService;
import com.mytijian.runtime.model.service.ServiceFacade;

/**
 * 钉钉相关对接
 * @author cheyanzhao
 *
 */
@Service
public class DingDingAdapterFacade implements ServiceFacade {
	
	@Autowired
	private DingDingService dingDingService;
	
	/**
	 * 套餐预约
	 * @param param
	 * @return
	 */
	@AliService(aliMethodName="alibaba.alihealth.examination.reserve.confirm")
	public DingDingConfirmResult confirm(DingDingReserveConfirmParam param) {
		return dingDingService.confirm(param);
	}
	
	/**
	 * 获取报告
	 * @param param
	 * @return
	 */
	@AliService(aliMethodName="alibaba.alihealth.examination.reserve.report")
	public DingDingReportResult report(DingDingReportParam param) {
		return dingDingService.report(param);
	}
	
	/**
	 * 预约改期
	 * @param param
	 * @return
	 */
	@AliService(aliMethodName="alibaba.alihealth.examination.reserve.modify")
	public DingDingConfirmResult modify(DingDingModifyParam param) {
		return dingDingService.modify(param);
	}
	
	/**
	 * 预约取消
	 * @param param
	 * @return
	 */
	@AliService(aliMethodName="alibaba.alihealth.examination.reserve.cancel")
	public DingDingBasicResult cancel(DingDingModifyParam param) {
		return dingDingService.cancel(param);
	}
	
	/**
	 * 套餐库存查询
	 * @param param
	 * @return
	 */
	@AliService(aliMethodName="alibaba.alihealth.examination.stock.query")
	public DingDingStockQueryResult stockQuery(DingDingStockQueryParam param) {
		return dingDingService.stockQuery(param);
	}
	
	/**
	 * 体检状态查询
	 * @param param
	 * @return
	 */
	@AliService(aliMethodName = "alibaba.alihealth.examination.reserve.state")
	public DingDingReserveStateResult state(DingDingReserveStateParam param) {
		return dingDingService.state(param);
	}
	
}
